<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class uhu_session</title>
			<link rel="stylesheet" href="../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class uhu_session</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
											<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
						
			</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Basic class for storing session data in a PDO-supported database. Server-specific commands are ommitted from the table creation query, an extended class' constructor may be used to change the storage engine to InnoDB on MySQL, for example.</p>
	<ul class="tags">
				<li><span class="field">abstract:</span> </li>
			</ul>
		<p class="notes">
			Located in <a class="field" href="_uhu---session.php.html">/uhu/session.php</a> (line <span class="field">48</span>)
		</p>
		
				
		<pre></pre>
	
			</div>
</div>


	<a name="sec-const-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constant Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Constants</span> (<a href="#sec-consts">details</a>)
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="const-summary">
								<div class="const-title">
					<img src="../media/images/Constant.png" alt=" " />
					<a href="#sql_create_session_table" title="details" class="const-name">sql_create_session_table</a> = 					<span class="var-type">
'CREATE TABLE IF NOT EXISTS session (
	id char(32),
	modified int,
	lifetime int,
	data text,
	PRIMARY KEY  (id)
)'</span>

				</div>
							</div>
		</div>
	</div>

	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
					</div>
		<div class="info-box-body">
			<div class="var-summary">
																								<div class="var-title">
					<span class="var-type">PDO</span>
					<a href="#$_PDO_write" title="details" class="var-name">$_PDO_write</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																												
												<div class="method-definition">
											<span class="method-result">uhu_session</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$username</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$password</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$dbname</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#salt" title="details" class="method-name">salt</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#setup_table" title="details" class="method-name">setup_table</a>
										()
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#start" title="details" class="method-name">start</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">$cookie_test</span> = <span class="var-default">false</span>])
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#throw_on_exec_fail" title="details" class="method-name">throw_on_exec_fail</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$sth</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$code</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">bool</span>
										<a href="#throw_on_prep_fail" title="details" class="method-name">throw_on_prep_fail</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">$PDO</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$query</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$code</span>)
									</div>
																<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#token" title="details" class="method-name">token</a>
										()
									</div>
								</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="var$_PDO_write" id="$_PDO_write"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">PDO</span>
			<span class="var-name">$_PDO_write</span>
						(line <span class="line-number">65</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">var:</span> The PDO connection used for read+write transactions</li>
				<li><span class="field">access:</span> protected</li>
				<li><span class="field">usedby:</span> <a href="../Sessions/uhu_session.html#methodsetup_table">uhu_session::setup_table()</a></li>
				<li><span class="field">usedby:</span> <a href="../Sessions/uhu_session.html#method__construct">uhu_session::__construct()</a></li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																			<a href="#sec-const-summary">Constants</a> (<a href="#sec-consts">details</a>)
							
										<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>

<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">75</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
				<li><span class="field">uses:</span> <a href="../Sessions/uhu_session.html#methodsetup_table">uhu_session::setup_table()</a></li>
				<li><span class="field">uses:</span> <a href="../Sessions/uhu_session.html#var$_PDO_write">uhu_session::$_PDO_write</a></li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">uhu_session</span>
		<span class="method-name">
			__construct
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$type</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$host</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$username</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$password</span>, <span class="var-type"></span>&nbsp;<span class="var-name">$dbname</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$type</span><span class="var-description">: the host name</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$host</span><span class="var-description">: the username</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$username</span><span class="var-description">: the password</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$password</span><span class="var-description">: the database name</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$dbname</span>			</li>
				</ul>
		
			
	</div>
<a name="methodsalt" id="salt"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">salt</span> (line <span class="line-number">251</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">abstract:</span> </li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			salt
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetup_table" id="setup_table"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setup_table</span> (line <span class="line-number">210</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Used to setup the session table on the database specified in the PDO connection</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
				<li><span class="field">usedby:</span> <a href="../Sessions/uhu_session.html#method__construct">uhu_session::__construct()</a></li>
				<li><span class="field">uses:</span> <a href="../Sessions/uhu_session.html#methodthrow_on_prep_fail">uhu_session::throw_on_prep_fail()</a></li>
				<li><span class="field">uses:</span> uhu_session::throw_on_exec_fail</li>
				<li><span class="field">uses:</span> <a href="../Sessions/uhu_session.html#constsql_create_session_table">uhu_session::sql_create_session_table</a></li>
				<li><span class="field">uses:</span> <a href="../Sessions/uhu_session.html#var$_PDO_write">uhu_session::$_PDO_write</a></li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			setup_table
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodstart" id="start"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">start</span> (line <span class="line-number">228</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			start
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">$cookie_test</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">$cookie_test</span>			</li>
				</ul>
		
			
	</div>
<a name="methodthrow_on_exec_fail" id="throw_on_exec_fail"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">throw_on_exec_fail</span> (line <span class="line-number">142</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Used as a shortcut for avoiding the duplication of code that throws an exception when PDOStatement execution fails.</p>
	<ul class="tags">
				<li><span class="field">return:</span> true if the PDOStatement executed succesfully, false otherwise (though the uhu_session_Exception should be thrown before the code can return false</li>
				<li><span class="field">access:</span> protected</li>
				<li><span class="field">uses:</span> <a href="../Sessions/UHU_exception/uhu_session_Exception.html">uhu_session_Exception</a></li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			throw_on_exec_fail
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$sth</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$code</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">PDOStatement</span>
				<span class="var-name">$sth</span><span class="var-description">: The PDOStatement to be executed</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$code</span><span class="var-description">: The error code to use when throwing uhu_session_Exception because the PDOStatement could not be executed</span>			</li>
				</ul>
		
			
	</div>
<a name="methodthrow_on_prep_fail" id="throw_on_prep_fail"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">throw_on_prep_fail</span> (line <span class="line-number">180</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Used as a shortcut for avoiding the duplication of code that throws an exception when SQL preparation fails.</p>
	<ul class="tags">
				<li><span class="field">return:</span> true if the SQL query was prepared successfully, false otherwise (though the uhu_session_Exception should be thrown before the code can return false</li>
				<li><span class="field">access:</span> protected</li>
				<li><span class="field">usedby:</span> <a href="../Sessions/uhu_session.html#methodsetup_table">uhu_session::setup_table()</a></li>
				<li><span class="field">uses:</span> <a href="../Sessions/UHU_exception/uhu_session_Exception.html">uhu_session_Exception</a></li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">bool</span>
		<span class="method-name">
			throw_on_prep_fail
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">$PDO</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$query</span>, <span class="var-type">int</span>&nbsp;<span class="var-name">$code</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">PDO</span>
				<span class="var-name">$PDO</span><span class="var-description">: The PDO connection to prepare the query with</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$query</span><span class="var-description">: The SQL query to prepare</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$code</span><span class="var-description">: The error code to use when throwing uhu_session_Exception because the PDOStatement could not be executed</span>			</li>
				</ul>
		
			
	</div>
<a name="methodtoken" id="token"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">token</span> (line <span class="line-number">216</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			token
		</span>
				()
			</div>
	
		
			
	</div>
						
		</div>
	</div>

	<a name="sec-consts"></a>
	<div class="info-box">
		<div class="info-box-title">Class Constants</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Constants</a> (<span class="disabled">details</span>)
						
			
												<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
														| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			<a name="constsql_create_session_table" id="sql_create_session_table"><!-- --></A>
<div class="oddrow">

	<div class="const-header">
		<img src="../media/images/Variable.png" />
		<span class="const-title">
			<span class="const-name">sql_create_session_table</span>
			 = <span class="const-default"><br />'CREATE TABLE IF NOT EXISTS session (<br />	id char(32),<br />	modified int,<br />	lifetime int,<br />	data text,<br />	PRIMARY KEY  (id)<br />)'</span>
			(line <span class="line-number">53</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">string The SQL query used to create the session table.</p>
	<ul class="tags">
				<li><span class="field">usedby:</span> <a href="../Sessions/uhu_session.html#methodsetup_table">uhu_session::setup_table()</a></li>
			</ul>
	
	
</div>
						
		</div>
	</div>

	<p class="notes" id="credit">
		Documentation generated on Tue, 13 Jan 2009 23:22:15 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
	</p>
	</div></body>
</html>